// Camera.h
//
// Class for controlling a camera.
//
// Author: Nick Kitten
// 2009

#pragma once

#include "PoseableObject.h"
#include "ImageUtils.h"

class Camera : public PoseableObject
{
public:
	Camera( int id, float x = 0, float y = 0, float z = 0, float rx = 0, float ry = 0, float rz = 0 );
	~Camera();

	void setPosition( float x, float y, float z );
	void setRotation( float x, float y, float z );

	void setView( int width, int height, int x = 0, int y = 0 );
	Rect getView() const;

	void lookAt( float x, float y, float z );
	void setToImage( int ID, int width, int height );

	// sets the current camera as the main camera
	void makeActive();
	bool isActive() const;

	void display();
	void displayMain();

protected:	
	// which camera is the main camera
	static int activeID;
	int imageID;
	Rect viewArea;
};